<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );


$config['validation'] = array(
    'addThread' => array(
        'fid'=> array(
            'name' => '活动类型',        
            'requirement' => 'function',
            'fname' => 'checkFid',
        ),
        'subject' => array(
            'name' => '标题',
            'requirement' => 'required|length[2-30]|illegal'
        ),
        'address' => array(
            'name' => '地址',
            'requirement' => 'required|length[3-50]|illegal'
        ),
        'realaddress' => array(
            'name' => '实际地址',
            'requirement' => 'length[*-200]|illegal'
        ),
        'tip' => array(
            'name' => '补充信息',
            'requirement' => 'length[*-200]|illegal'
        ),
        'playtime' => array(
            'name' => '开始时间',
            'requirement' => 'required|datetime'
        ),
        /*
        'continue' => array(
            'name' => '持续时间',
            'requirement' => 'float|range[1-10]'
        ),
        */
        'friends' => array(
            'name' => '小伙伴人数',
            'requirement' => 'range[1-10]'
        ),
        'cityid' => array(
            'name' => '城市ID',
            'requirement' => 'digit'
        ),
        'longitude' => array(
            'name' => '经度',
            'requirement' => 'float'
        ),
        'latitude' => array(
            'name' => '纬度',
            'requirement' => 'float'
        )
    ),
    'addPost' => array(
        'fid'=> array(
            'name' => '活动类型',        
            'requirement' => 'function',
            'fname' => 'checkFid',
        ),
        'tid'=> array(
            'name' => '活动编号',
            'requirement' => 'digit'
        ),
        'message' => array(
            'name' => '评论内容',
            'requirement' => 'required|illegal|length[3-100]'
        ),
        /*
        //暂不需要
        'longitude' => array(
            'name' => '经度',
            'requirement' => 'float'
        ),
        'latitude' => array(
            'name' => '纬度',
            'requirement' => 'float'
        )
        */
    ),
    'getThreadNearby' => array(
        'lng' => array(
            'name' => '经度',
            'requirement' => 'required|float'
        ),
        'lat' => array(
            'name' => '纬度',
            'requirement' => 'required|float'
        ),
        'fid'=> array(
            'name' => '活动类型',        
            'requirement' => 'function',
            'fname' => 'wrapFid',
        ),
        'cityid' => array(
            'name' => '城市ID',
            'requirement' => 'digit'
        ),
    ),
    'getThreadSummary' => array(
        'tid'=>array(
            'name' => '活动编号',        
            'requirement' => 'required|digit'
        )
    ),
    'getDiscuss' => array(
        'tid'=>array(
            'name' => '活动编号',        
            'requirement' => 'required|digit'
        ),
        'from'=>array(
            'name' => '偏移',        
            'requirement' => 'required|digit'
        ),
        'limit'=>array(
            'name' => '消息数',        
            'requirement' => 'required|digit'
        ),
    ),
    'isJoined' => array(
        'tid'=>array(
            'name' => '活动编号',        
            'requirement' => 'required|digit'
        ),
        'uid'=>array(
            'name' => '用户ID',        
            'requirement' => 'required|digit'
        ),
    ),
    'getMyThreads' => array(
        'fid'=> array(
            'name' => '活动类型',        
            'requirement' => '2int',
        ),
        'from'=>array(
            'name' => '偏移',        
            'requirement' => 'required|digit'
        ),
        'limit'=>array(
            'name' => '活动数量',        
            'requirement' => 'required|digit'
        ),
        'authorid'=>array(
            'name' => '用户ID',        
            'requirement' => 'required|digit'
        ),
    ),
    'getUserInfoSummary' => array(
        'uid'=>array(
            'name' => '用户ID',        
            'requirement' => 'digit'
        ),
    ),
    'setMemberDetail' => array(
        'gender'   => array(
            'name' => '性别',
            'requirement' => 'range[1-2]'
        ),
        'birthday' => array(
            'name' => '出生日期',
            'requirement' => 'required|date'
        ),
        'height' => array(
            'name' => '身高',
            'requirement' => 'required|range[140-230]'
        ),
        'player_type' => array(
            'name' => '类型',
            'requirement' => 'digit'
        ),
        'area' => array(
            'name' => '地区',
            'requirement' => 'illegal'
        ),
    ),
    'create' => array(
        'email' => array(
            'name' => '帐号',
            'requirement' => 'required|email',
        ),
        'username' => array(
            'name' => '昵称',
            'requirement' => 'length[2-10]|illegal'
        ),
        'password' => array(
            'name' => '密码',
            'requirement' => 'password|length[6-30]'
        ),
        'repassword' => array(
            'name' => '重复密码',
            'requirement' => 'password|length[6-30]'
        ),
    ),
    'check' => array(
        'email' => array(
            'name' => 'email帐号格式',
            'requirement' => 'required|email',
        ),
        'password' => array(
            'name' => '密码',
            'requirement' => 'password|length[6-30]'
        ),
    ),
    'changePassword' => array(
        'oldPassword' => array(
            'name' => '原密码',
            'requirement' => 'password|length[6-30]'
        ),
        'newPassword' => array(
            'name' => '新密码',
            'requirement' => 'password|length[6-30]'
        ),
        'rePassword' => array(
            'name' => '重复密码',
            'requirement' => 'password|length[6-30]'
        ),
    ),
    'suggest' => array(
        'message' => array(
            'name' => '意见内容',
            'requirement' => 'required|illegal|length[3-400]'
        ),
        'email' => array(
            'name' => '邮箱帐号',
            'requirement' => 'email',
        ),
    ),
    'addReset' => array(
        'email' => array(
            'name' => '邮箱帐号',
            'requirement' => 'email',
        )
    ),
    'checkReset' => array(
        'uid'=>array(
            'name' => '用户ID',        
            'requirement' => 'required|digit'
        ),
        'verify' => array(
            'name' => '重置验证码',
            'requirement' => 'length[30-50]|illegal'
        )
    ),
    'resetPassword' => array(
        'password' => array(
            'name' => '新密码',
            'requirement' => 'password|length[6-30]'
        ),
        'repassword' => array(
            'name' => '重复密码',
            'requirement' => 'password|length[6-30]'
        ),
    ),
);
